package cn.enjoy.mq;


import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
//定义该类需要监听的队列
@RabbitListener(queues = "enjoy")
public class Receiver {

    @RabbitHandler
    public void process(String msg){
        System.out.println("reveive msg :"+msg);
    }
}
